﻿using System;
using MongoDB.Bson;

namespace QuotationService.HistoryQuotation
{
    /// <summary>
    /// 基本信息历史数据类
    /// </summary>
    internal class StockBasicInfo
    {
        public ObjectId _id;

        #region 属性（数据）

        /// <summary>
        /// 商品代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 证券简称前缀
        /// </summary>
        public string ShortPrefix { get; set; }

        /// <summary>
        /// 英文简称
        /// </summary>
        public string EnglishName { get; set; }

        /// <summary>
        /// 基础证券
        /// </summary>
        public string BaseStock { get; set; }

        /// <summary>
        /// ISIN 编码
        /// </summary>
        public string ISINCode { get; set; }

        /// <summary>
        /// 商品类别
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 货币种类
        /// </summary>
        public string CurrencyType { get; set; }

        /// <summary>
        /// 行情来源
        /// </summary>
        public string QuotLevel { get; set; }

        /// <summary>
        /// 行业种类
        /// </summary>
        public string IndustryType { get; set; }

        /// <summary>
        /// 交易类别
        /// </summary>
        public string TradeType { get; set; }

        /// <summary>
        /// 涨停价
        /// </summary>
        public double MaxOrderPrice { get; set; }

        /// <summary>
        /// 跌停价
        /// </summary>
        public double MinOrderPrice { get; set; }

        /// <summary>
        /// 开盘价
        /// </summary>
        public double OpenPrice { get; set; }

        /// <summary>
        /// 收盘价
        /// </summary>
        public double PreClosePrice { get; set; }

        /// <summary>
        /// 上市日期
        /// </summary>
        public Int32 BeginDate { get; set; }

        /// <summary>
        /// 到期/交割日
        /// </summary>
        public Int32 EndDate { get; set; }

        /// <summary>
        /// 退市日期
        /// </summary>
        public Int32 AccountDate { get; set; }

        /// <summary>
        /// 价格档位
        /// </summary>
        public double OrderPriceUnit { get; set; }

        /// <summary>
        /// 小数位数
        /// </summary>
        public Int32 Decimal { get; set; }

        /// <summary>
        /// 交易单位
        /// </summary>
        public Int32 TradeUnit { get; set; }

        /// <summary>
        /// 买入下限
        /// </summary>
        public Int32 LowBuyQtyLimit { get; set; }

        /// <summary>
        /// 卖出下限
        /// </summary>
        public Int32 LowSellQtyLimit { get; set; }

        /// <summary>
        /// 买入上限
        /// </summary>
        public Int32 HighBuyQtyLimit { get; set; }

        /// <summary>
        /// 卖出上限
        /// </summary>
        public Int32 HighSellQtyLimit { get; set; }

        /// <summary>
        /// 每股面值
        /// </summary>
        public double ParValue { get; set; }

        /// <summary>
        /// 总发行量
        /// </summary>
        public Int64 TotalIssueQty { get; set; }

        /// <summary>
        /// 流通股数
        /// </summary>
        public Int64 TotalCirculatingShare { get; set; }

        /// <summary>
        /// 每百元应计利息
        /// </summary>
        public double AccuredInterest { get; set; }

        /// <summary>
        /// 昨日成交量
        /// </summary>
        public Int64 PreExchTotalKnockQty { get; set; }

        /// <summary>
        /// 昨日成交金额
        /// </summary>
        public double PreExchTotalKnockAmt { get; set; }
              
        /// <summary>
        /// 每手数量
        /// </summary>
        public Int32 ConvertQty { get; set; }

        /// <summary>
        /// 市场
        /// </summary>
        public char ExchId { get; set; }

        /// <summary>
        /// 交易状态
        /// </summary>
        public char TradeStatus { get; set; }

        /// <summary>
        /// 交收天数
        /// </summary>
        public Int16 StkDeliveryDays { get; set; }

        /// <summary>
        /// 停盘标志
        /// </summary>
        public char SuspendedFlag { get; set; }

        /// <summary>
        /// 上年每股利润
        /// </summary>
        public double LastAnnualProfit { get; set; }

        /// <summary>
        /// 本年每股利润
        /// </summary>
        public double AnnualProfit { get; set; }

        /// <summary>
        /// 债券起息日
        /// </summary>
        public Int32 BondBonusDate { get; set; }

        /// <summary>
        /// 债券折合比例
        /// </summary>
        public double BondConvertRate { get; set; }

        /// <summary>
        /// 担保物折算率
        /// </summary>
        public double GuarantyConvertRate { get; set; }

        /// <summary>
        /// 融资标的标志
        /// </summary>
        public char FinancingLoanFlag { get; set; }

        /// <summary>
        /// 融券标的标志
        /// </summary>
        public char SecuritiesLoanFlag { get; set; }

        /// <summary>
        /// 成份股标志
        /// </summary>
        public char ComponentStockFlag { get; set; }

        /// <summary>
        /// 做市商标志
        /// </summary>
        public char MarketMakerFlag { get; set; }

        /// <summary>
        /// 证券级别
        /// </summary>
        public char LevelFlag { get; set; }

        /// <summary>
        /// 产品交易阶段
        /// </summary>
        public char TradeStageFlag { get; set; }

        /// <summary>
        /// 融资交易状态
        /// </summary>
        public char FinancingLoanTradingFlag { get; set; }

        /// <summary>
        /// 融券交易状态
        /// </summary>
        public char SecuritiesLoanTradingFlag { get; set; }

        /// <summary>
        /// 融券卖出价格限制
        /// </summary>
        public char SecuritiesLoanSellPriceLimitFlag { get; set; }

        /// <summary>
        /// 网络投票标志
        /// </summary>
        public char VoteFlag { get; set; }

        /// <summary>
        /// 其他业务状态
        /// </summary>
        public string OtherBizStatus { get; set; }

        /// <summary>
        /// 回购天数
        /// </summary>
        public int RepurchaseDay { get; set; }

        /// <summary>
        ///记录更新的时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 行情记录中包含的行情时间
        /// </summary>
        public DateTime QuotationTime { get; set; }

        /// <summary>
        /// 静态资料版本，格式为：YYYYMMDDxxxxxx，即：年月日+递增数字
        /// </summary>
        public Int64 StaticVer { get; set; }
        /// <summary>
        /// 动态资料版本，格式为：YYYYMMDDxxxxxx，即：年月日+递增数字
        /// </summary>
        public Int64 DynamicVer { get; set; }
        #endregion

    }
}
